#ifndef _VISION_CONE_H_
#define _VISION_CONE_H_

#pragma once
#include "SceneObject.h"
#include "Scene.h"
#include "SDL_rotozoom.h"
#include <iostream>
#include "math.h"

typedef std::list<SDL_Surface*> LISTSUR;

namespace ui{

class VisionCone :	public SceneObject {

private: 

	int speed;
	int angularSpd;
	bool rotation;
	string sceneBackgroundPath;
	SDL_Surface *second_background; //el fondo del escenario

	SDL_Rect object_rect;
	SDL_Surface *rotated_surface;
	
	LISTSUR* rotSurfaces;
	LISTSUR::iterator surfaces_it;
	
public:

	VisionCone(void);
	VisionCone(int posX, int posY, int angle);

	void setRotation(bool flag);
	bool getRotation();

	void setSpeed(int speed);
	int getSpeed();
	
	void setAngularSpd(int angSpd);
	int getAngularSpd();
		 
	void setSceneBackgroundPath(string path);

	void loadSurface() throw (SDL_Exception);

	void draw(SDL_Surface* s);

	void move(Component*s);
	void rotate();
	SDL_Surface* resize(float newWidth, float newHeigth, SDL_Surface* screen);

	virtual ~VisionCone(void);
};
};


#endif


